
clear all

import excel "C:\Users\Admin\OneDrive - Chulalongkorn University\Blue Econoomy\Blue_Data2.xlsx", sheet("Cleaned") firstrow
label variable eTh "individual harvest"
label variable Sum_eTh "group harvest"
label variable c "cost"
gen prop_ind_catch=(eTh/18)*100
replace medVarVote=18 if Session=="Symatric_ext_reg" | Session=="Asymatric_ext_reg"
gen comply=0
replace comply=1 if eTh<=medVarVote
gen interven=0
replace interven=1 if round>10
gen asym=0
replace asym=1 if Session=="Asymatric-Control"|Session=="Asymatric_ext_reg"|Session=="Asymatric_Patial_communication_wo-revealed"|Session=="Asymatric_Patial_communication_w-revealed"|Session=="Asymatric_full_communication"
gen ext=0
replace ext=1 if Session=="Asymatric_ext_reg"|Session=="Symatric_ext_reg"
gen r_partial=0
replace r_partial=1 if Session=="Asymatric_Patial_communication_w-revealed"|Session=="Symatric_Patial_communication_w-revealed"
gen nr_partial=0
replace nr_partial=1 if Session=="Asymatric_Patial_communication_wo-revealed"|Session=="Symatric_Patial_communication_wo-revealed"
gen full=0
replace full=1 if Session=="Symatric_full_communication"|Session=="Asymatric_full_communication"


xtset id round

**Intervention***
**Tab 7 Model 1****
xtreg prop_ind_catch interven, fe 
estimate store fixed
xtreg prop_ind_catch interven, re 
hausman fixed ., sigmamore
xtreg prop_ind_catch interven, re vce(cluster id) 


drop if round<11
**Treatment Effect Proportion of individual harvest***
**Tab 7 Model 2 and F-test****
xtreg prop_ind_catch r_partial nr_partial full, re vce(cluster id)


test r_partial=nr_partial
test r_partial=full
test nr_partial=full

****Compliance****
**Tab 8 Model 3 and F-test***

xtreg comply r_partial nr_partial full, re vce(cluster id)


test r_partial=nr_partial
test r_partial=full
test nr_partial=full

***Voting Behavior***
gen v_r_partial=medVarVote*r_partial
gen v_nr_partial=medVarVote*nr_partial
gen v_full=medVarVote*full
**Tab 8 Model 4 ***
xtreg prop_ind_catch voteResult v_r_partial v_nr_partial v_full, re cluster(id)


**Cost Structure Effect***
gen h_cost=0
replace h_cost=1 if c==.35
gen h_r_partial=h_cost*r_partial
gen h_nr_partial=h_cost*nr_partial
gen h_full=h_cost*full

**Tab8 Model 5,6 and 7***
xtreg prop_ind_catch h_cost h_r_partial h_nr_partial h_full if asym==1, re cluster(id)
xtreg comply h_cost h_r_partial h_nr_partial h_full if asym==1, re cluster(id)
xtreg prop_ind_catch h_cost h_r_partial if asym==1&(Session=="Asymatric_Patial_communication_w-revealed"|Session=="Asymatric_Patial_communication_wo-revealed"), re cluster(id)



**harvest round by round Figure 1 and 2*** 
**SymExt
replace Group=1 if id<=25 
**SymFull
replace Group=2 if id>25&id<=50 
**SymW
replace Group=3 if id>50&id<=75
**AsymExt
replace Group=4 if id>75&id<=90
**AsymWO
replace Group=5 if id>90&id<=115
**AsymW
replace Group=6 if id>115&id<=140
**AsymFull
replace Group=7 if id>140&id<=165
**SymWO
replace Group=8 if id>165&id<=190
**AsymExt
replace Group=9 if id>190

by round, sort: sum prop_ind_catch if round>10&(Group==1|Group==4|Group==9)
by round, sort: sum prop_ind_catch if round>10&(Group==2|Group==7)
by round, sort: sum prop_ind_catch if round>10&(Group==3|Group==6)
by round, sort: sum prop_ind_catch if round>10&(Group==5|Group==8)


**% of vote Figure 3
drop if medVarVote<18
gen pvote=(medVarVote/18)*100
mean pvote if Session=="Symatric_full_communication"
mean pvote if Session=="Asymatric_full_communication"
mean pvote if Session=="Symatric_Patial_communication_w-revealed"
mean pvote if Session=="Asymatric_Patial_communication_w-revealed"
mean pvote if Session=="Symatric_Patial_communication_wo-revealed"
mean pvote if Session=="Asymatric_Patial_communication_wo-revealed"


*** harvest in Asymmetry case Figure 4***
mean eTh if round>10&c>.3&Session=="Asymatric_full_communication"
mean eTh if round>10&c<.3&Session=="Asymatric_full_communication"
mean eTh if round>10&c>.3&Session=="Asymatric_Patial_communication_w-revealed"
mean eTh if round>10&c<.3&Session=="Asymatric_Patial_communication_w-revealed"
mean eTh if round>10&c>.3&Session=="Asymatric_Patial_communication_wo-revealed"
mean eTh if round>10&c<.3&Session=="Asymatric_Patial_communication_wo-revealed"
mean eTh if round>10&c>.3&Session=="Asymatric_ext_reg"
mean eTh if round>10&c<.3&Session=="Asymatric_ext_reg"
